﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:Foursquare" xmlns:Microsoft_Phone_Controls_Maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" xmlns:System_Device_Location="clr-namespace:System.Device.Location;assembly=System.Device" 
    x:Class="Foursquare.MainPage" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<DataTemplate x:Key="VenueTemplate">
			<StackPanel Margin="0,0,0,12">
				<TextBlock Text="{Binding name}" FontFamily="Segoe WP Light" FontSize="42.667"/>
				<TextBlock><TextBlock.Foreground>
						<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
					</TextBlock.Foreground><Run Text="{Binding location.distance}"/><Run Text=" meters"/></TextBlock>
				<TextBlock><Run Text="{Binding location.address}"/><LineBreak/><Run Text="{Binding location.city}"/><Run Text=", "/><Run Text="{Binding location.state}"/></TextBlock>
			</StackPanel>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>
<!--Panorama-based applications should not show an ApplicationBar-->
	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
<!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" d:DataContext="{d:DesignData /SampleData/ResponseSampleData.xaml}">
        <controls:Panorama x:Name="mainpano" Title="my application">

            <!--Panorama item one-->
            <controls:PanoramaItem Header="nearby">
                <Grid>
                	<ListBox x:Name="nearbyList" ItemTemplate="{StaticResource VenueTemplate}" ItemsSource="{Binding venues}" SelectionChanged="nearbyList_SelectionChanged"/>
                	<Button Content="refresh" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-95,0,0" Click="refresh_Click"/>
                	<toolkit:PerformanceProgressBar x:Name="progress" VerticalAlignment="Top" IsIndeterminate="True" ActualIsIndeterminate="True" Visibility="Collapsed"/>
                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Header="map">
                <Grid>
                	<Microsoft_Phone_Controls_Maps:Map x:Name="bingMap" ZoomBarVisibility="Visible" ZoomLevel="6">
                		<Microsoft_Phone_Controls_Maps:Map.Center>
                			<System_Device_Location:GeoCoordinate Altitude="NaN" Course="NaN" HorizontalAccuracy="NaN" Longitude="100.5" Latitude="13.7" Speed="NaN" VerticalAccuracy="NaN"/>
                		</Microsoft_Phone_Controls_Maps:Map.Center>
                		<Microsoft_Phone_Controls_Maps:Pushpin Content="Pushpin"/>
                	</Microsoft_Phone_Controls_Maps:Map>
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

</phone:PhoneApplicationPage>